<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./css/shop.css">
    <script src="./js/jquery-1.12.4.js"></script>
    <script src="./js/jquery.cookie.js"></script>
    <script src="./js/layer/layer.js"></script>
    <script src="./js/shop.js"></script>

    <style>
        .a1 {
            background: url(./banggou/Veo_mbshop_spirit_pic.png) 0 -1060px no-repeat;
        }

        .a2 {
            background: url(./banggou/online_service.png) no-repeat
        }
    </style>
</head>
<script>
    $(function(){
        
        var flag=false;
        var login=JSON.parse($.cookie("loginInfo")||'[]');
        if(login.length == 0){
        $(".c1 .yxr").attr("href","login.html")
        $(".c1 .yxr").html("登录");
    }else{
        $(".c1 .yxr").attr("href","javascript:;")
        $(".c1 .yxr").html(login[0].uname)
        flag=true;
    }
    if(flag){
        $.ajax({
            url:"./api/shop",
            type:"get",
            data:{
                uid:JSON.parse($.cookie("loginInfo"))[0].uid
            }
        }).done(function(res){
            console.log(res);
            render(res.data)
        })
    }
        
    })
    function render(arr){
        var html="";
        arr.forEach(el => {
            html+=`
            <div class="clearfix d" >
            <input type="checkbox" class="inp3 float_l zha4">
                    <img src="./images/xn1.jpg" class="img1 float_l">
                    <div class="kw1 float_l">
                        <div class="di1 float_l">
                            <p class="float_l ns1">
                                <span class="t1"> ${el.p_name}</span>
                               
                            </p>
                            <p class="float_r ns2">
                                <span class="t2"></span>
                                <span class="cm">尺码:${el.p_size}</span>
                            </p>
                        </div>
                        <span class="t3">商品编号: B09694</span>
                        <ul class="t4">
                            <li><img src="./images/kw2.gif">满赠</li>
                            <li><img src="./images/kw3.gif">包邮</li>
                            <li class="li3"><img src="./images/kw4.gif">不可用红包</li>
                            <li><img src="./images/kw5.gif">比加入时优惠￥0.00</li>
                        </ul>
                    </div>
                    <div class="kw2 float_l">
                        <span class="q1">￥429</span>
                        <span>￥<span class="lf">${el.p_price}</span></span>
                        <div class="q2">修改优惠<img src="./images/sanjiao.gif">
                            <div class="qq1">
                                <p>
                                    <input type="radio">
                                    <span>满三件总价6.9折</span>
                                </p>
                                <p>
                                    <input type="radio">
                                    <span>不使用活动优惠</span>
                                </p>
                            </div>
                        </div>
                        

                    </div>
                    <div class="kw3 float_l">
                        <p class="q3"  data-cid=${el.c_id}>
                            <span class="w1 float_l" id="jian">-</span>
                            <span class="w2 float_l ">${el.p_num}</span>
                            <span id="jia">+</span>
                        </p>
                    </div>
                    <p class="kw4 float_l">￥<span class='zha'>${el.u_total}</span></p>
                    <p class="kw5 float_l">
                        <span>移入收藏夹</span>
                        <span class="del" data-cid=${el.c_id}>删除</span>
                    </p>
                   </div> 
            `;
            $(".p6").html(html);
        });
    }


</script>
<body>
    <div class="box">
        <div class="box1 main">
            <p class="float_l ">欢迎来到邦购网，全场实付满99包邮，本网站多为断码限量商品，支持14天无理由退货，不支持退差价，感谢理解。</p>
            <ul class="right float_l clearfix">
                <li class="c1"><a class="yxr">登录</a>
                    <div class="ri1">
                        <ul>
                            <li>
                                <a>QQ账户登录</a>
                                <a>支付宝登录</a>
                                <a>微信账户登录</a>
                            </li>
                           
                        </ul>
                    </div>
                </li>
                <li ><a href="register.html">注册</a></li>
                <li class="c1 c2">
                    <a>我的邦购</a>
                    <img src="./images/sanjiao.gif" class="im1">
                    <div class="ri1 ri2">
                        <ul>
                            <li>
                                <a>我的订单</a>
                                <a>我的积分</a>
                                <a>我的点赞</a>
                                <a>收货地址</a>
                            </li>
                           
                        </ul>
                    </div>
                </li>
                <li><a>会员中心</a></li>
                <li class="c1 c3"><img src="./images/Iphone-vertical.png" class="im2"></img><a class="aaa1">下载APP</a><img
                        src="./images/sanjiao.gif" class="im1">
                        <img src="./images/mbshop_pic_mobile.png" class="ri1 ri3">
                    </li>
                <li class="c4">
                    <a>微博</a>
                <span class="ri4">新浪微博</span>
                </li>
                <li class="c1">
                    <a>微信</a>
                    <img src="./images/mbshop_pic_mobile.png" class="ri1 ri3 ri5">
                </li>
            </ul>
        </div>
    </div>
        <div class="box2">
            <div class="top main ">
                <img src="./images/mbshop_new_logo2.png" class="img1 float_l">
                <p class="float_l p1">
                    <span class="spa1 float_l">1</span>
                    <span>查看购物袋</span>
                    <img src="./images/san1.gif">
                </p>
            </div>
        </div>
        <p class="main p2">
            购物袋
        </p>
        <div class="box3 main">
            <ul class="ul2">
                <li class="li1">
                    <input type="checkbox" class="zha2">
                    <a>全选</a>
                </li>
                <li class="li2"><a>商品信息</a></li>
                <li class="li3"><a>颜色尺码</a></li>
                <li class="li4"><a>单价(元)</a></li>
                <li class="li5"><a>数量</a></li>
                <li class="li6"><a>小计</a></li>
                <li><a>操作</a></li>
            </ul>
            <div class="top2 ">
                <p class="float_l">购物车中有<span class="sp">1件商品已降价</span>点击查看</p>
                <img src="./images/Veo_double11_wap_pop_goods_close_666.png" class="float_l">
            </div>
            <div class="top3">
             
                <p class="p4">
                    <span class="sp1 float_l">赠品</span>
                    <span>再买211.8元，即可选赠品一件</span>
                </p>
                <p class="p5">
                    <span class="sp2 float_l">多买优惠</span>
                    <span>已满1件,已享8.0折优惠;再买1件,即享7.0折优惠;再买2件,即享6.5折优惠</span>
                </p>
                <div class="p6 ">
          

                </div>
            </div>
        </div>
        <ul class="box4 main">
            <li class="li1"> <input type="checkbox" class="zha3"></li>
            <li>全选</li>
            <li class="li2">删除选中商品</li>
            <li>清除失效商品</li>
            <li class="li3">已选商品<span>1</span>件</li>
            <li class="li4">商品总价￥109-优惠￥0.00</li>
            <li>合计(不含运费)：</li>
            <li class="li5">￥<span class="zha1 float_r">109</span></li>
            <li class="li6">去结算</li>
        </ul>
        <p class="box5 main">
            最近浏览的商品
        </p>
        <div class="box6 main">
            <img src="./images/776644_00.jpg">
            <p class="nc1">女潮酷破洞围巾</p>
            <span>￥119.00</span>
            <p class="nc2">加入购物袋</p>
        </div>
        <div class="box7 main">

            <img src="./images/zyshare01.png" class="tp1 float_l">


            <img src="./images/zyshare02.png" class="tp2 float_l">

            <img src="./images/zyshare03.png" class="tp2 float_l">
            <div class="tp4 float_l">
                <img src="./images/zsss.jpg" class="s2">
                <ul class="imag1">
                    <li class="s1 float_l">
                        <img src="./images/indexonline (1).png">
                        <p>在线客服</p>
                    </li>
                    <li class="s1 float_l">
                        <img src="./images/indexopinion (1).png">
                        <p>意见反馈</p>
                    <li class="s3 float_l">
                        <img src="./images/indexsurvey (1).png">
                        <p>问卷调查</p>
                    </li>
                    </li>
                </ul>
            </div>

        </div>
        <div class="box8">
            <div class="wz1 main">
                <div class="button1 float_l">
                    <ul class="xs1 float_l">
                        <li class="l1">新手指南</li>
                        <li>注册新用户</li>
                        <li>用户协议</li>
                        <li>找回密码</li>
                    </ul>
                </div>
                <div class="button1 float_l">
                    <ul class="xs1 float_l">
                        <li class="l1">购物指南</li>
                        <li>红包使用说明</li>
                        <li>购物流程</li>
                        <li>订单状态</li>
                        <li>邦购币绑定与使用</li>
                    </ul>
                </div>
                <div class="button1 float_l">
                    <ul class="xs1 float_l">
                        <li class="l1">配送方式</li>
                        <li>配送范围</li>
                        <li>订单拆分</li>
                        <li>商品验货与签收</li>
                    </ul>
                </div>
                <div class="button1 float_l">
                    <ul class="xs1 float_l">
                        <li class="l1">支付方式</li>
                        <li>发票制度</li>
                        <li>支付方式</li>
                    </ul>
                </div>
                <div class="button1 float_l">
                    <ul class="xs1 float_l">
                        <li class="l1">售后服务</li>
                        <li>退换货政策</li>
                        <li>退换办理流程</li>
                        <li>退款说明</li>
                    </ul>
                </div>
                <div class="button1 float_l">
                    <ul class="xs1 float_l">
                        <li class="l1">联系方式</li>
                        <li>在线客服</li>
                        <li>咨询电话:4008219988</li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="box9 main">
            <p>CopyRight © 2000-2019,版权所有 上海美特斯邦威服饰股份有限公司沪ICP备05033127号|沪ICP证B2-20150114021-38119999 营业执照</p>
            <img src="./images/lz_beian_h40.png" class="be1">
            <img src="./images/lz_shgs_h40.png" class="be2">
            <img src="./images/brand_bottom_small.jpg">
        </div>
    
   
   
   
   
   
   
   
   
   
    <div class="huojian">
            <a class="a1" href="javascript:void(0)" id="a1" >
            </a>
            <a href="" class="a2"></a>
    
    
        </div>
    

</body>

</html>